1. Field of the Invention
The present invention relates to a method, system, program, and data structures for backing up files and, in particular, removing obsolete versions of backup sets as a result of the backup operation.
2. Description of the Related Art
In a client/server environment, the client may back-up data at a central server. In prior art systems, a full back-up of data may be performed from the client to the server and subsequent incremental backups are then performed. In the IBM and Tivoli Storage Management products, such as the Adstar Distributed Storage Manager (ADSM), backup-archive clients can back up and restore files and directories at a server. The backup-archive client can copy files, subdirectories, and directories to media controlled by the server. Backups can be controlled by administrator-defined policies and schedules, or users can request backups of their own data. The backup policy in the backup copy group indicates how many backup versions the server keeps of files and directories, and how long the server keeps backup versions of files and directories before expiring the previous versions of the backup sets. The most recent backup version of a file, referred to as the active version, is not eligible for expiration; only inactive backup versions can be expired.
Prior art versions of ADSM include a backup/archive client for backing up files and a client for backing-up database objects. Back-ups at the file level involve inserting a new version of the entire file including changes since the prior backup. However, database application clients that interface with database products may use ADSM commands to perform incremental backups of the database object that include only the changed data since the last full backup, not the entire database object. This allows the database application client to only send that part of the database object that has changed in the incremental backup to the backup server instead of having to send the entire database object, which can be substantially large. The schedule of performing incremental backups is defined in the backup copy group of the management class for the files. ADSM also provides a differential or cumulative incremental backup that has all changes since the full backup. Thus, there is only one differential backup needed to provide updates since the full backup. Differential and incremental backup sets including changes since a full backup are referred to herein as xe2x80x9cdeltaxe2x80x9d backup sets. Additional details of the use of ADSM to backup files is described in the IBM publication xe2x80x9cUsing ADSM to Back Up Databases,xe2x80x9d IBM publication no. SG24-4335-03 (IBM Copyright, July, 1998), which publication is incorporated herein by reference in its entirety.
In the prior art, a new version of the full backup plus a related delta(s) including changes since the related full backup are provided unique names with respect to previous versions of the backup and related delta sets. Backups that comprise a full backup set with no delta backup set(s) are provided the same name among versions. Older obsolete versions are maintained on the backup server. When a newer backup version of an object has the same name as the previous version, such as the case with a full backup without delta backup set(s), then the older version is automatically inactivated when the newer version is added to the backup server. On the other hand, in the prior art, full backup sets that have related delta backup sets are uniquely named and are not automatically inactivated when a newer version is generated. Thus, obsolete versions of full backups and related delta backups are not rendered inactive when a new full backup set is added to the server that renders the previous full and related delta backups obsolete. In the prior art, to remove obsolete versions of full and delta backup sets of database objects, a user at the database client would use ADSM commands to generate a report to review the current backup sets of database objects in the server and to inactivate some or all of the obsolete database backup sets. The server periodically runs an expiration routine to determine which inactive backups to delete. The backup files the user manually inactivated are deleted by the server when it checks for old inactive jobs to expire according to a predetermined date or version number expiration requirement set in the management policy.
There is a need in the art for an improved method, system, and program for removing obsolete backup sets.
To overcome the limitations in the prior art described above, preferred embodiments disclose a system, method, program, and data structure for performing a backup operation of a target file. At least one operation is initiated to perform at least one delta backup of the target file to at least one delta backup set. A delta backup set includes changes made to a version of a full backup set of the target file generated at a first time. The at least one delta backup set is assigned a name component indicating the version of the full backup set generated at the first time subject to the delta backup and an operation is initiated to perform a full backup of the target file to a version of the full backup set at a second time. The second time follows the first time. A determination is made of all delta backup sets having the name component indicating the version of the full backup set generated at the first time during the full backup operation at the second time. An operation is initiated to render inactive the determined delta backup sets having the name component indicating the version of the full backup generated at the first time.
In further embodiments, the version of the full backup set of the target file generated at the second time during the full backup operation at the second time becomes the active backup set of the target file. In such case, the version of the full backup set generated at the first time is inactivated.
In yet further embodiments, the delta backup comprises an incremental backup operation that includes all updates to the target file since the previous incremental backup operation. A name is assigned to each incremental backup set that includes a name component indicating the target file and an incremental backup. During each incremental backup operation, a determination is made of a latest time value associated with all incremental backup sets of the target file. The determined latest time value is incremented to generate a new time value. This new time value is included as a name component for the incremental backup set for the target file created during the incremental backup operation.
In client/server embodiments, the operations of initiating each delta backup, the new full backup, assigning the name component, and rendering inactive all the determined delta backup sets is performed at a client computer. The client computer initiates the operations by communicating a command and the target file to backup to a server computer to backup at a storage device. The client computer further determines all the delta backup sets having the name component indicating the target file by querying the server for all delta backup sets having the name component indicating the target file.
With the preferred embodiments, whenever a backup operation is performed, a determination is automatically made of all delta backup sets, i.e., incremental and differential sets, related to the previous full backup. The determined delta backup sets are rendered inactive. This is accomplished by providing each delta backup set a name including a unique name of the target file subject to the backup, a delta backup indicator. Upon performing a new full backup operation, all current delta backups for the target file can be determined from the name components. This naming convention and method allow the delta backups to be automatically removed during the creation of a new full backup set of the target file. Further, with preferred embodiments any full backups have the same name as the previous version, thereby superseding the previous version as the active backup. In this way, whenever a backup is made, any obsolete versions of the backup sets related to the target file are rendered inactive and subject to later removal during expiration operations.